package util

import "time"

const (
	//查询时默认集合状态
	DefaultCollectionStatus = -1

	CollectionUnMint         = 1
	CollectionMintInProgress = 2
	CollectionMintCompleted  = 3
	CollectionPublished      = 4
	//Published ---出售起始时间 ---Onsale---出售结束时间---Ended---超时时间(不可见)
	//出售中和已结束以及不可见三种状态后端通过时间直接判断，数据库的只存储上面几种状态
	//返回时赋值但是不对数据库做修改
	CollectionOnSale    = 5
	CollectionEnded     = 6
	CollectionBurning   = 7
	CollectionInvisible = 8 //超过结束时间30分钟
	CollectionKeepEnded = 9 //手动置顶已结束的集合，只能手动下架

	//OffShelfLiftTime 在已结束中展示的时间
	OffShelfLiftTime = time.Minute * 30

	//MinimumInterval 发售时间最小间隔
	MinimumInterval = time.Minute * 5
	MinimumSaleTime = time.Minute * 1

	InvalidTime = -1
)

//可修改状态
var CollectionForModify = []int{CollectionUnMint, CollectionMintCompleted}

//首页筛选状态
var CollectionStatusForHomePage = []int{CollectionPublished}

//可以立刻查询的状态
var CollectionStatusForQueryDirect = []int{CollectionUnMint, CollectionMintInProgress, CollectionMintCompleted, CollectionBurning}

const (
	//构造集合时的默认参数
	DefaultSupplies  = 0
	DefaultCounter   = 0
	DefaultTokenId   = 0
	DefaultIssuer    = "metatown发行方"
	DefaultFavorites = 10
	DefaultPrice     = -1

	DefaultCollectionSymbol = "DefaultSymbol"
	//默认的子集合ID,subCollection为0代表该集合对应的collection,之后的ID为子集合ID
	DefaultSubCollectionIndex = 0
	//第一个子集合ID
	FirstSubCollectionIndex = 1
)

const (
	//创建集合时的名称长度限制
	LowerBoundOfCollectionName = 3
	UpperBoundOfCollectionName = 20

	//集合价格的位数限制(小数点之前)
	LowerBoundOfPriceBeforeDecimalPoint = 1
	UpperBoundOfPriceBeforeDecimalPoint = 15
	//集合价格的位数限制(小数点之后)
	UpperBoundOfPriceAfterDecimalPoint = 2

	//有需要时作为返回的错误子集合ID
	ErrorOfSubCollectionIndex = -1

	//查询时代表全部子集合
	QueryOfSubCollectionIndex = -1

	//铸造时图片名称长度校验
	LowerBoundOfFileNameForMint = 1
	UpperBoundOfFileNameForMint = 100

	//铸造时图片url长度校验
	LowerBoundOfFileUrlForMint = 5
	UpperBoundOfFileUrlForMint = 400

	//铸造时图片描述长度校验
	LowerBoundOfFileDescriptionForMint = 1
	UpperBoundOfFileDescriptionForMint = 200

	//铸造时铸造次数范围校验
	LowerBoundOfMintAmountForMint = 1
	UpperBoundOfMintAmountForMint = 5000
)
